/**
 * Created by cjd on 2016/6/28.
 */
angular.module("app").controller("topic.comments.Ctrl", ["$scope", "$http", "$stateParams", "topic", function ($scope, $http, $stateParams, topic) {
    if ($stateParams.id) {
        topic.getComments({}, {id: $stateParams.id}, function (data) {
            if (data.statusCode == 0) {
                $scope.commentList = data.data;
            } else {
                alert(data.statusMessage)
            }
        })
    }
}]);